<?php


namespace app\api\controller\v1;


use app\api\service\UserToken;
use app\api\validate\TokenGetValidate;

class Token
{
    public function getToken($code = '')
    {
        (new TokenGetValidate())->goCheck();
        $ut = new UserToken($code);
        $token = $ut->get();
        // 令牌
        return ['token' => $token];
    }
}